package com.lalifa.googledate.ui.activity

import com.lalifa.base.BaseTitleActivity
import com.lalifa.googledate.databinding.ActivityPrivacyBinding
import java.io.IOException

class PrivacyActivity : BaseTitleActivity<ActivityPrivacyBinding>() {
    override fun getViewBinding()= ActivityPrivacyBinding.inflate(layoutInflater)

    override fun initView() {
        binding.privacy.text = LoadData("licence.txt")
    }

    private fun LoadData(inFile: String): String? {
        var tContents: String? = ""
        try {
            val stream = assets.open(inFile)
            val size = stream.available()
            val buffer = ByteArray(size)
            stream.read(buffer)
            stream.close()
            tContents = String(buffer)
        } catch (e: IOException) {
            // Handle exceptions here
        }
        return tContents
    }
}